package models;

import dao.common.ShopOwnersRepository;
import dao.ebean.ShopOwnersRepositoryImpl;
import play.data.validation.Constraints.Required;

public class Login {
    @Required
    public String email;
    @Required
    public String password;
    
    public String validate(){
        ShopOwnersRepository shopOwnersRepository = new ShopOwnersRepositoryImpl();
        if (!shopOwnersRepository.isValid(email, password)){
            return "error.wronglogininfo";
        } else {
            return null;
        }
    }
}
